public class Point{
	private int x;
	private int y;
	private String position;

	public Point(int x, int y){
		this.x = x;
		this.y = y;
		position = initializePosition();
	}

	public int getX(){
		return x;
	}

	public int getY(){
		return y;
	}

	public String getPosition(){
		return position;
	}

	public void setX(int x){
		this.x = x;
		position = initializePosition();
	}

	public void setY(int y){
		this.y = y;
		position = initializePosition();
	}

	public double distance(Point point){
		return Math.hypot(this.x - point.x , this.y - point.y);
	}

	public void translate(int dx, int dy){
		x += dx;
		y +=dy;
		position = initializePosition();
	}

	public void swapCoordinates(){
		int temp = x;
		x = y;
		y = temp;
		position = initializePosition();
	}

	private String initializePosition(){
		String pstn;
		if(x == 0 && y == 0)
			pstn = "origin";
		else if(x > 0 && y == 0)
			pstn = "positive x-axis";
		else if(x < 0 && y == 0)
			pstn = "negative x-axis";
		else if(y > 0 && x == 0)
			pstn = "positive y-axis";
		else if(y < 0 && x == 0)
			pstn = "negative y-axis";
		else if(x > 0 && y > 0)
			pstn = "first quadrant";
		else if(x < 0 && y > 0)
			pstn = "second quadrant";
		else if(x < 0 && y < 0)
			pstn = "third quadrant";
		else
			pstn = "fourth quadrant";

		return pstn;
	}
}